/*----------------------------------------------------------------------------------------------------
** Created by        : [zhaoyang]
** Created date      : 2022-09-28
** Version           : 1.0
** Descriptions      : flash管理处理程序
**---------------------------------------------------------------------------------------------------*/

#ifndef __FLASH_MANAGE_H__
#define __FLASH_MANAGE_H__



/***********************************************************************************/
//                  宏定义           
/***********************************************************************************/

#define SPI_FLASH_CHIP_SIZE                                                               (16*1024*1024)

//存储系统信息使用 4096：
#define SPI_FLASH_SYSINFO_ADDR_START 						    0x0000
#define SPI_FLASH_SYSINFO_SIZE 							        (4 * 1024)
#define SPI_FLASH_SYSINFO_ADDR_END 						        (SPI_FLASH_SYSINFO_ADDR_START + SPI_FLASH_SYSINFO_SIZE - 1)

//预留存储资源使用 1M：图片字库这些
#define SPI_FLASH_RESOURCE_ADDR_START 						    (SPI_FLASH_SYSINFO_ADDR_END + 1)
#define SPI_FLASH_RESOURCE_SIZE 							    ((3 * 1024 - 4) * 1024)
#define SPI_FLASH_RESOURCE_ADDR_END 						    (SPI_FLASH_RESOURCE_ADDR_START + SPI_FLASH_RESOURCE_SIZE - 1)

//存储语音音频管理信息
#define SPI_FLASH_VOICE_MNG_DATA_ADDR_START 					(SPI_FLASH_RESOURCE_ADDR_END + 1)
#define SPI_FLASH_VOICE_MNG_DATA_SIZE 						    (4 * 1024)
#define SPI_FLASH_VOICE_MNG_DATA_ADDR_END 					    (SPI_FLASH_VOICE_MNG_DATA_ADDR_START + SPI_FLASH_VOICE_MNG_DATA_SIZE - 1)

//存储语音音频信息
#define SPI_FLASH_VOICE_DATA_ADDR_START 					    (SPI_FLASH_VOICE_MNG_DATA_ADDR_END + 1)     //0x301000
#define SPI_FLASH_VOICE_DATA_SIZE 						        ((10 * 1024 - 4) * 1024)
#define SPI_FLASH_VOICE_DATA_ADDR_END 					        (SPI_FLASH_VOICE_DATA_ADDR_START + SPI_FLASH_VOICE_DATA_SIZE - 1)

//存储的数据的管理信息
#define SPI_FLASH_DATA_MANAGER_ADDR_START 					    (SPI_FLASH_VOICE_DATA_ADDR_END + 1)
#define SPI_FLASH_DATA_MANAGER_SIZE 						    (4 * 1024)
#define SPI_FLASH_DATA_MANAGER_ADDR_END 					    (SPI_FLASH_DATA_MANAGER_ADDR_START + SPI_FLASH_DATA_MANAGER_SIZE - 1)

//存储的运动记录信息
#define SPI_FLASH_SPORT_DATA_ADDR_START 					    (SPI_FLASH_DATA_MANAGER_ADDR_END + 1)
#define SPI_FLASH_SPORT_DATA_SIZE 						        (4 * 1024)
#define SPI_FLASH_SPORT_DATA_ADDR_END 					        (SPI_FLASH_SPORT_DATA_ADDR_START + SPI_FLASH_SPORT_DATA_SIZE - 1)

//运动实时速度数据
#define SPI_FLASH_SPEED_RT_DATA_ADDR_START 					    (SPI_FLASH_SPORT_DATA_ADDR_END + 1)
#define SPI_FLASH_SPEED_RT_DATA_SIZE 						    ((1 * 1024 -8) * 1024)
#define SPI_FLASH_SPEED_RT_DATA_ADDR_END 					    (SPI_FLASH_SPEED_RT_DATA_ADDR_START + SPI_FLASH_SPEED_RT_DATA_SIZE - 1)




#pragma pack(1)



#pragma pack()




#endif // __FLASH_MANAGE_H__

